home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / WIN_PRO / WTEK0593.ZIP;1 / EDIT-CPP.ZIP / EDITODOC.CPP next >
Encoding:
C/C++ Source or Header  |  1993-03-07  |  1.8 KB  |  79 lines

  1. // editodoc.cpp : implementation of the CEditorDoc class
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "editor.h"
  6.  
  7. #include "editodoc.h"
  8.  
  9. #ifdef _DEBUG
  10. #undef THIS_FILE
  11. static char BASED_CODE THIS_FILE[] = __FILE__;
  12. #endif
  13.  
  14. /////////////////////////////////////////////////////////////////////////////
  15. // CEditorDoc
  16.  
  17. IMPLEMENT_DYNCREATE(CEditorDoc, COleClientDoc)
  18.  
  19. BEGIN_MESSAGE_MAP(CEditorDoc, COleClientDoc)
  20.     //{{AFX_MSG_MAP(CEditorDoc)
  21.         // NOTE - the ClassWizard will add and remove mapping macros here.
  22.         //    DO NOT EDIT what you see in these blocks of generated code !
  23.     //}}AFX_MSG_MAP
  24. END_MESSAGE_MAP()
  25.  
  26. /////////////////////////////////////////////////////////////////////////////
  27. // CEditorDoc construction/destruction
  28.  
  29. CEditorDoc::CEditorDoc()
  30. {
  31.     // TODO: add one-time construction code here
  32. }
  33.  
  34. CEditorDoc::~CEditorDoc()
  35. {
  36. }
  37.  
  38. BOOL CEditorDoc::OnNewDocument()
  39. {
  40.     if (!COleClientDoc::OnNewDocument())
  41.         return FALSE;
  42.     // TODO: add reinitialization code here
  43.     // (SDI documents will reuse this document)
  44.     return TRUE;
  45. }
  46.  
  47. /////////////////////////////////////////////////////////////////////////////
  48. // CEditorDoc serialization
  49.  
  50. void CEditorDoc::Serialize(CArchive& ar)
  51. {
  52.     ((CEditView*)m_viewList.GetHead())->SerializeRaw(ar);
  53. }
  54.  
  55. void CEditorDoc::DeleteContents()
  56. {
  57.     // TODO: add additional cleanup before doc-items are deleted
  58.     COleClientDoc::DeleteContents();    // delete doc-items
  59. }
  60.  
  61. /////////////////////////////////////////////////////////////////////////////
  62. // CEditorDoc diagnostics
  63.  
  64. #ifdef _DEBUG
  65. void CEditorDoc::AssertValid() const
  66. {
  67.     COleClientDoc::AssertValid();
  68. }
  69.  
  70. void CEditorDoc::Dump(CDumpContext& dc) const
  71. {
  72.     COleClientDoc::Dump(dc);
  73. }
  74.  
  75. #endif //_DEBUG
  76.  
  77. /////////////////////////////////////////////////////////////////////////////
  78. // CEditorDoc commands
  79.